<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.hotel.jabc.DB" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    
    <title>My JSP 'adminRestop.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="../css/generalstyle.css">
	<script type="text/javascript">
	function check()
	{
		if(document.searchRes.rgid.value=="")
		{
			alert("请输入编号查询！！");
			searchRes.rgid.focus();
			return false;
		}
		document.searchRes.submit();
	}
	</script>

  </head>
  
  <body>
    <%@ include file="admintop.jsp" %>
    <hr width="100%"></hr><br>
    <form name="searchRes" action="servlet/ListServlet" method="post">
    <table align="left" border="0" width="98.5%">
    	<tr>
    		<td align="center">
    			<a target="balnk" href="jsp/addRes.jsp">添加资源</a>
    		</td>
    		
    			<td align="right">编号：
    				<input type="text" name="rgid"/>
    				<input type="button" value="查询" onclick="check()"/>
    				<input type="hidden" name="action" value="queryRes">
    			</td>
    		
    	</tr>
    </table><br><br><br>
    </form>
    <table align="left" bgcolor="C4DCDF" width="17%" height="40%">
    	<th>分组</th>
    	<tr>
    		<td align="center">
    			<a href=servlet/ListServlet?action=adminList&&gId=0>所有分组</a>
    		</td>
    	</tr>
    	<%
    		Vector<String []> vgroup =DB.getGroup();//得到分组信息
			for(String [] s:vgroup)
			{    		
    	 %>
    	 <tr>
    	 	<td align="center">
    	 		<a href=servlet/ListServlet?action=adminList&&gId=<%=s[3] %>><%=s[0] %></a>
    	 	</td>
    	 </tr>
    	 <%} %>
    </table>
  </body>
</html>
